package com.aa;



import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ListAdapter;
import android.widget.ListView;

public class CornerListView extends ListView
{
  public CornerListView(Context paramContext)
  {
    super(paramContext);
  }

  public CornerListView(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
  }

  public CornerListView(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
  {
    super(paramContext, paramAttributeSet, paramInt);
  }

  public boolean onInterceptTouchEvent(MotionEvent paramMotionEvent)
  {
    switch (paramMotionEvent.getAction())
    {
   
    case 0:
    
   
    
      int i = pointToPosition((int)paramMotionEvent.getX(), (int)paramMotionEvent.getY());
      if (i != -1){
        if (i == 0)
        {
          if (i == -1 + getAdapter().getCount())
            setSelector(R.drawable.app_list_corner_round);
          else
            setSelector(R.drawable.app_list_corner_round_top);
        }
        else if (i == -1 + getAdapter().getCount())
          setSelector(R.drawable.app_list_corner_round_bottom);
        else
          setSelector(R.drawable.app_list_corner_shape);
      }
    }
      return super.onInterceptTouchEvent(paramMotionEvent);
    
  }
}
